home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / Nuntius 1.2 / src / Nuntius / URealNntp.h < prev    next >
Encoding:
Text File  |  1994-02-20  |  1.3 KB  |  55 lines  |  [TEXT/MPS ]

  1. // Copyright © 1992 Peter Speck, speck@dat.ruc.dk. All rights reserved.
  2. // URealNntp.h
  3.  
  4. #define __UREALNNTP__
  5.  
  6. #ifndef __UNNTP__
  7. #include "UNntp.h"
  8. #endif
  9.  
  10. #ifndef __UNETASCIIPROTOCOL__
  11. #include "UNetAsciiProtocol.h"
  12. #endif
  13.  
  14. class PRealNntp : public PNntp, public PNetAsciiProtocol
  15. {
  16.     public:
  17.         // All retuned handles are null terminated like c strings
  18.         // and they are owned by the caller
  19.         
  20.         Handle GetListOfAllGroups();
  21.         Handle GetListOfNewGroups(unsigned long fromDate);
  22.         
  23.         Handle GetListOfGroupDesciptions();
  24.         // OBS: uses non-standard "list newsgroups" command.
  25.         // If the server returns "unknown command" errors, an empty handle is returned
  26.         
  27.         Handle GetHeaderList(const char *headerName, long firstArticleID, long lastArticleID);
  28.         
  29.         Handle GetArticle(long articleID);
  30.         
  31.         void PostArticle(Handle h, short ackStringID);
  32.  
  33.         Boolean IsPostingAllowed(); // general, not for the specific group
  34.         
  35.         virtual void ExamineNewsServer();
  36.  
  37.         PRealNntp();
  38.         void IRealNntp(long newsServerAddr);
  39.         ~PRealNntp();
  40.     private:
  41.         Boolean fPostingAllowed;
  42.         Boolean fAvoidListOfGroupDescriptions;
  43.         Ptr fCmdP, fAltCmdP;
  44.         // command buffer (c-string)
  45.         // should not be CR/LF terminated, only text as C-string
  46.         
  47.  
  48.         void DoFailNntpError(char *cmd);
  49.         void DoSetGroup(const CStr255 &name);
  50.         void DoCmd();
  51.         void DoAuth();
  52.         void DoSingleCommand(char *cmd);
  53.         void SayGoodbye();
  54. };
  55.